﻿@using DbLibrary.Models
@model MVC_web_Face.Controllers.FillupCreateWrap
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
    <head>
        <title>Новая заправка</title>
        <link rel="stylesheet" href="../../JQueryUI/css/cupertino/jquery-ui-1.10.4.custom.css"/>
        <script type="text/javascript" src="../../JQueryUI/js/jquery-ui-1.10.4.custom.js">
        </script>

        <script type="text/javascript" language="javascript">
            $(document).ready(function () {
                $('.datepicker').datepicker();
            })
        </script>
    </head>
    <body>
        <div>
            @{
                var cars = new List<SelectListItem>();
                foreach (Car car in ViewBag.CarList)
                {
                    cars.Add(new SelectListItem()
                    {
                        Text = car.Name,
                        Value = car.Id.ToString()
                    });
                }
                //
                var periods = new List<SelectListItem>();
                foreach (ReportPeriod period in ViewBag.ReportList)
                {
                    periods.Add(new SelectListItem()
                    {
                        Text = period.Name,
                        Value = period.Id.ToString()
                    });
                }
            }
            @using (Html.BeginForm("NewGasoline", "Home"))
            {
                @Html.DropDownListFor(_ => _.CarId, cars, "Выберите машину", new {@class = "item"}); 
                    <br/>
                @Html.DropDownListFor(_ => _.ReportPeriodId, periods, "Выберите период отчётности", new {@class = "dropdown"}); 
                <br/>
                    @Html.TextBox("name", "10:10:2010", new {@class = "datepicker"})
                <br/>
                <input type="submit" value="Готово" class="btn btn-info"/>
            }
        </div>
    </body>
</html>